/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2013/04/01
* File: ForDirectionalLightingPass.cpp
* Blog: http://www.cnblogs.com/zengqh/
**/

#include "ForDirectionalLightingPass.h"

namespace HY
{
ForDirectionalLightingPass::ForDirectionalLightingPass(RenderSystem* render_sys)
: SceneRenderPass(render_sys)
{

}

ForDirectionalLightingPass::~ForDirectionalLightingPass()
{

}

void ForDirectionalLightingPass::render(const RenderableList& render_list)
{
	RenderableList::const_iterator iter = render_list.begin();
	for (; iter != render_list.end(); ++iter)
	{
		SceneNode* node = (SceneNode*)(*iter);
		Mesh* mesh = node->getMesh();
		MeshLODLevel* lv = mesh->GetLODLevel();

		IndexBuffer* ib = lv->getIndexBuffer();

		render_sys_->setIndexBuffer(ib);

		bool light_enabled = !(getFlags() & NoLighting);


	}
}
}